package com.itheima.demoString;

import com.itheima.domain.Student;

import java.util.Scanner;

public class Demo08String {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入学生信息:");
        String s = sc.next();
        //String s = "张三,24";
        String[] s1 = s.split(",");//用逗号隔开,点号应该"\\."
        Student stu = new Student(s1[0], s1[1]);
        System.out.println(stu.getName() + "..." + stu.getAge());
    }
}
